package com.huangsm.cloud.microservicerabbitmq.service;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author huang
 * @PACKAGE_NAME com.huangsm.cloud.microservicerabbitmq.service
 * @PROJECT_NAME microservice-springcloud
 * @date 2019/1/17
 */
@Service
public class AmqpServiceImpl implements AmqpService{
    @Autowired
    private AmqpTemplate amqpTemplate;
    @Override
    public void convertAndSend(String message) {
        amqpTemplate.convertAndSend("com.queue.notify.hello", message);
    }
}
